package jwj8508.swing.jdbc;

import javax.swing.JDialog;
import javax.swing.JFrame;
import javax.swing.JLabel;
import java.awt.BorderLayout;
import javax.swing.JButton;
import java.awt.Dialog.ModalityType;
import javax.swing.JPanel;
import javax.swing.BoxLayout;
import javax.swing.ImageIcon;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import java.awt.Toolkit;

public class J26_SungJukAboutDialog extends JDialog {
	
	public J26_SungJukAboutDialog(JFrame p) {
		super(p);		
		
		setTitle("프로그램 정보");
		setSize(450,400);
		setModalityType(ModalityType.DOCUMENT_MODAL);
		setLocationRelativeTo(null);
		setResizable(false);		
		
		JPanel westp = new JPanel();
		getContentPane().add(westp, BorderLayout.WEST);
		westp.setLayout(new BoxLayout(westp, BoxLayout.PAGE_AXIS));
		
		JLabel imglbl = new JLabel("");
		imglbl.setIcon(new ImageIcon(J26_SungJukAboutDialog.class.getResource("/img/8urs.gif")));
		westp.add(imglbl);
		
		JLabel lblNewLabel = new JLabel("");
		lblNewLabel.setIcon(new ImageIcon(J26_SungJukAboutDialog.class.getResource("/img/32.gif")));
		westp.add(lblNewLabel);
		
		JPanel eastp = new JPanel();
		getContentPane().add(eastp, BorderLayout.EAST);
		eastp.setLayout(new BoxLayout(eastp, BoxLayout.X_AXIS));
		
		JLabel introlbl = new JLabel("..........");
		eastp.add(introlbl);
		
		JPanel southp = new JPanel();
		getContentPane().add(southp, BorderLayout.SOUTH);
		
		JButton okbtn = new JButton("확인");
		okbtn.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				setVisible(false);	// AboutDialog를 화면에서 지우고 
				dispose();	// 메모리에 생성된 AboutDialog 객체를 제거
			}
		});
		southp.add(okbtn);
		
		setVisible(true);
		
	}
	

}
